//
//  BBToolTabView.m
//  xNose
//
//  Created by ben smith on 18/09/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "BBToolTabView.h"
#import "BBImageButtonFactory.h"

@implementation BBToolTabView
- (id)initWithFrame:(NSRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		// Initialization code here.
		// add the various views
		NSRect buttonRect = [self buttonRect];
				
		NSButton * button1 = [BBImageButtonFactory bulbButtonInRect:buttonRect];
		[button1 setTarget:self];
		[button1 setAction:@selector(bulbClick)];
		[self addSubview:button1];
		
		buttonRect.origin.x += [self buttonBorder];
		
		NSButton * button2 = [BBImageButtonFactory connectionButtonInRect:buttonRect];
		[button2 setTarget:self];
		[button2 setAction:@selector(connectClick)];
		[self addSubview:button2];
		
		
		buttonRect.origin.x += [self buttonBorder];
		
		NSButton * button3 = [BBImageButtonFactory magnifierButtonInRect:buttonRect];
		[button3 setTarget:self];
		[button3 setAction:@selector(zoomClick)];
		[self addSubview:button3];
		// set the stuckout var so that the tab comes out far enough
		stuckOutX = stuckInX - (buttonRect.origin.x + 25);
	}
	return self;
}


@end
